{"ast":null,"code":"import DeleteOutlined from \"@ant-design/icons/es/icons/DeleteOutlined\";\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport Checkbox from '../checkbox';\nimport LocaleReceiver from '../locale/LocaleReceiver';\nimport defaultLocale from '../locale/en_US';\nimport TransButton from '../_util/transButton';\nconst ListItem = props => {\n  const {\n    renderedText,\n    renderedEl,\n    item,\n    checked,\n    disabled,\n    prefixCls,\n    onClick,\n    onRemove,\n    showRemove\n  } = props;\n  const className = classNames({\n    [`${prefixCls}-content-item`]: true,\n    [`${prefixCls}-content-item-disabled`]: disabled || item.disabled,\n    [`${prefixCls}-content-item-checked`]: checked\n  });\n  let title;\n  if (typeof renderedText === 'string' || typeof renderedText === 'number') {\n    title = String(renderedText);\n  }\n  return /*#__PURE__*/React.createElement(LocaleReceiver, {\n    componentName: \"Transfer\",\n    defaultLocale: defaultLocale.Transfer\n  }, contextLocale => {\n    const liProps = {\n      className,\n      title\n    };\n    const labelNode = /*#__PURE__*/React.createElement(\"span\", {\n      className: `${prefixCls}-content-item-text`\n    }, renderedEl);\n    // Show remove\n    if (showRemove) {\n      return /*#__PURE__*/React.createElement(\"li\", Object.assign({}, liProps), labelNode, /*#__PURE__*/React.createElement(TransButton, {\n        disabled: disabled || item.disabled,\n        className: `${prefixCls}-content-item-remove`,\n        \"aria-label\": contextLocale.remove,\n        onClick: () => {\n          onRemove === null || onRemove === void 0 ? void 0 : onRemove(item);\n        }\n      }, /*#__PURE__*/React.createElement(DeleteOutlined, null)));\n    }\n    // Default click to select\n    liProps.onClick = disabled || item.disabled ? undefined : () => onClick(item);\n    return /*#__PURE__*/React.createElement(\"li\", Object.assign({}, liProps), /*#__PURE__*/React.createElement(Checkbox, {\n      className: `${prefixCls}-checkbox`,\n      checked: checked,\n      disabled: disabled || item.disabled\n    }), labelNode);\n  });\n};\nexport default /*#__PURE__*/React.memo(ListItem);","map":{"version":3,"names":["DeleteOutlined","classNames","React","Checkbox","LocaleReceiver","defaultLocale","TransButton","ListItem","props","renderedText","renderedEl","item","checked","disabled","prefixCls","onClick","onRemove","showRemove","className","title","String","createElement","componentName","Transfer","contextLocale","liProps","labelNode","Object","assign","remove","undefined","memo"],"sources":["/data/messenger.client/node_modules/antd/es/transfer/ListItem.js"],"sourcesContent":["import DeleteOutlined from \"@ant-design/icons/es/icons/DeleteOutlined\";\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport Checkbox from '../checkbox';\nimport LocaleReceiver from '../locale/LocaleReceiver';\nimport defaultLocale from '../locale/en_US';\nimport TransButton from '../_util/transButton';\nconst ListItem = props => {\n  const {\n    renderedText,\n    renderedEl,\n    item,\n    checked,\n    disabled,\n    prefixCls,\n    onClick,\n    onRemove,\n    showRemove\n  } = props;\n  const className = classNames({\n    [`${prefixCls}-content-item`]: true,\n    [`${prefixCls}-content-item-disabled`]: disabled || item.disabled,\n    [`${prefixCls}-content-item-checked`]: checked\n  });\n  let title;\n  if (typeof renderedText === 'string' || typeof renderedText === 'number') {\n    title = String(renderedText);\n  }\n  return /*#__PURE__*/React.createElement(LocaleReceiver, {\n    componentName: \"Transfer\",\n    defaultLocale: defaultLocale.Transfer\n  }, contextLocale => {\n    const liProps = {\n      className,\n      title\n    };\n    const labelNode = /*#__PURE__*/React.createElement(\"span\", {\n      className: `${prefixCls}-content-item-text`\n    }, renderedEl);\n    // Show remove\n    if (showRemove) {\n      return /*#__PURE__*/React.createElement(\"li\", Object.assign({}, liProps), labelNode, /*#__PURE__*/React.createElement(TransButton, {\n        disabled: disabled || item.disabled,\n        className: `${prefixCls}-content-item-remove`,\n        \"aria-label\": contextLocale.remove,\n        onClick: () => {\n          onRemove === null || onRemove === void 0 ? void 0 : onRemove(item);\n        }\n      }, /*#__PURE__*/React.createElement(DeleteOutlined, null)));\n    }\n    // Default click to select\n    liProps.onClick = disabled || item.disabled ? undefined : () => onClick(item);\n    return /*#__PURE__*/React.createElement(\"li\", Object.assign({}, liProps), /*#__PURE__*/React.createElement(Checkbox, {\n      className: `${prefixCls}-checkbox`,\n      checked: checked,\n      disabled: disabled || item.disabled\n    }), labelNode);\n  });\n};\nexport default /*#__PURE__*/React.memo(ListItem);"],"mappings":"AAAA,OAAOA,cAAc,MAAM,2CAA2C;AACtE,OAAOC,UAAU,MAAM,YAAY;AACnC,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,OAAOC,QAAQ,MAAM,aAAa;AAClC,OAAOC,cAAc,MAAM,0BAA0B;AACrD,OAAOC,aAAa,MAAM,iBAAiB;AAC3C,OAAOC,WAAW,MAAM,sBAAsB;AAC9C,MAAMC,QAAQ,GAAGC,KAAK,IAAI;EACxB,MAAM;IACJC,YAAY;IACZC,UAAU;IACVC,IAAI;IACJC,OAAO;IACPC,QAAQ;IACRC,SAAS;IACTC,OAAO;IACPC,QAAQ;IACRC;EACF,CAAC,GAAGT,KAAK;EACT,MAAMU,SAAS,GAAGjB,UAAU,CAAC;IAC3B,CAAE,GAAEa,SAAU,eAAc,GAAG,IAAI;IACnC,CAAE,GAAEA,SAAU,wBAAuB,GAAGD,QAAQ,IAAIF,IAAI,CAACE,QAAQ;IACjE,CAAE,GAAEC,SAAU,uBAAsB,GAAGF;EACzC,CAAC,CAAC;EACF,IAAIO,KAAK;EACT,IAAI,OAAOV,YAAY,KAAK,QAAQ,IAAI,OAAOA,YAAY,KAAK,QAAQ,EAAE;IACxEU,KAAK,GAAGC,MAAM,CAACX,YAAY,CAAC;EAC9B;EACA,OAAO,aAAaP,KAAK,CAACmB,aAAa,CAACjB,cAAc,EAAE;IACtDkB,aAAa,EAAE,UAAU;IACzBjB,aAAa,EAAEA,aAAa,CAACkB;EAC/B,CAAC,EAAEC,aAAa,IAAI;IAClB,MAAMC,OAAO,GAAG;MACdP,SAAS;MACTC;IACF,CAAC;IACD,MAAMO,SAAS,GAAG,aAAaxB,KAAK,CAACmB,aAAa,CAAC,MAAM,EAAE;MACzDH,SAAS,EAAG,GAAEJ,SAAU;IAC1B,CAAC,EAAEJ,UAAU,CAAC;IACd;IACA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